package com.doordu.framework.cloud.xxl.executor;

import com.xxl.job.core.executor.XxlJobExecutor;

/**
 * @author zxw
 * @date 2020/9/25 10:32
 */
public class DoorduJobExecutor extends XxlJobExecutor {

    public DoorduJobExecutor() {
    }

    public static class Builder {
        private DoorduJobExecutor result;

        public Builder(DoorduJobExecutor result) {
            this.result = result;
        }

        public static Builder newBuilder() {
            return new Builder(new DoorduJobExecutor());
        }

        public Builder setAddress(String address) {
            result.setAddress(address);
            return this;
        }
        public Builder setAccessToken(String accessToken) {
            result.setAccessToken(accessToken);
            return this;
        }
        public Builder setAppName(String appName) {
            result.setAppname(appName);
            return this;
        }
        public Builder setAdminAddresses(String adminAddresses) {
            result.setAdminAddresses(adminAddresses);
            return this;
        }
        public Builder setIp(String Ip) {
            result.setIp(Ip);
            return this;
        }
        public Builder setPort(int port) {
            result.setPort(port);
            return this;
        }
        public Builder setLogPath(String logPath) {
            result.setLogPath(logPath);
            return this;
        }
        public Builder setLogRetentionDays(int logRetentionDays) {
            result.setLogRetentionDays(logRetentionDays);
            return this;
        }

        public DoorduJobExecutor build() {
            return result;
        }
    }
}
